Author Topic: Simplest default opengl implementation  (Read 492 times)

kiptron

  • Regular Member
  • *
  • Posts: 10
Simplest default opengl implementation
« on: June 07, 2020, 04:53:39 AM »
  The attached is the simplest implementation of the opengl 3D rendering API.
There are NO third party libraries, no glu, no glut, no glee etc. etc.  Just the masm32 SDK
code and mine. It requires a 64 bit machine. Mine is a stock 64 bit Windows 10 machine,
I am not sure about Windows 7.  I have an AMD graphics card. They have publicly
announced the end of support for ogl in favor of Vulkan.  I have only the generic ogl driver
opengl32.dll provided by Microsoft with it's Windows installation.  This file either finds your
installed Vendor driver for your card, or defaults into graphics memory (I think). I am not
sure exactly how all this works. I have provided many notes in the three .asm files. To
assemble and link, put this folder in your root directory and run the batch file "makeit.bat"
You should have the masm32 SDK in the usual masm32 directory and your environment
path should point to the masm32 SDK.  \bin64  \include64 and \lib64  You can just run the
.exe file if you want to make sure this code will run successfully on your machine. Kiptron
 
 

asherxo

  • Regular Member
  • *
  • Posts: 1
Re: Simplest default opengl implementation
« Reply #1 on: August 30, 2020, 11:09:07 PM »
  The attached is the simplest implementation of the opengl 3D rendering API.
There are NO third party libraries, no glu, no glut, no glee etc. etc.  Just the masm32 SDK
code and mine. It requires a 64 bit machine. Mine is a stock 64 bit Windows 10 machine,
I am not sure about Windows 7.  I have an AMD graphics card. They have publicly
announced the end of support for ogl in favor of Vulkan.  I have only the generic ogl driver
opengl32.dll provided by Microsoft with it's Windows installation.  This file either finds your
installed Vendor driver for your card, or defaults into graphics memory (I think). I am not
sure exactly how all this works. I have provided many notes in the three .asm files. To
assemble and link, put this folder in your root directory and run the batch file "makeit.bat"
You should have the masm32 SDK in the usual masm32 directory and your environment
path should point to the masm32 SDK.  \bin64  \include64 and \lib64  You can just run the
.exe file if you want to make sure this code will run successfully on your machine. Kiptron
 
 

Hey thanks for the roadrunner email attachments. Will try it on mine and update you the results.
« Last Edit: September 23, 2020, 11:31:17 PM by asherxo »

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7608
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Simplest default opengl implementation
« Reply #2 on: August 30, 2020, 11:38:06 PM »
Don't know why but the exe will not run on my win10 64 pro. I will give it a try on my dev partition.

Solved the problem, my old box have an Nvidia 960 and the app would not run. Tried it on my new box with a Radeon RX580 and it runs perfect. Very classy work, it looks great.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 10644
  • Assembler is fun ;-)
    • MasmBasic
Re: Simplest default opengl implementation
« Reply #3 on: August 31, 2020, 01:48:12 AM »
Works fine on Win7-64 - my compliments :thumbsup:

caballero

  • Member
  • *****
  • Posts: 1494
  • Matrix - Noah
    • abre ojos ensamblador
Re: Simplest default opengl implementation
« Reply #4 on: August 31, 2020, 03:29:00 AM »
I couldn't run it on my PC with a NVIDIA too. What can we watch on it?
The logic of the error is hidden among the most unexpected lines of the program

kiptron

  • Regular Member
  • *
  • Posts: 10
Re: Simplest default opengl implementation
« Reply #5 on: September 05, 2020, 11:00:28 AM »
 Sorry  guys with the Invidia cards. I tried to use the most generic extension calls. Nothing to watch but
A boring little demo. It is the simplest "immediate mode" funtionality. To those wishing to move on to
more advanced topics like custom shaders,  high speed rendering with arrays of positional and color
data, texturing,  lighting,  and all that cool stuff,  you will use a combination of original  calls and some
of the extension pointers created in the file "extensions" in the attachment. Modern OGL is all about
extensions providing the advanced functionality.  In the 64 bit world you MUST know your stuff about
the Win64 (X64) calling convention, especially as regards floating point versus integer arguments. I am
still struggling after years so you are in for a lot of studying if you wish to explore the very cool 3D
world.  Kiptron

daydreamer

  • Member
  • *****
  • Posts: 1384
  • building nextdoor
Re: Simplest default opengl implementation
« Reply #6 on: September 05, 2020, 08:37:13 PM »
Sorry  guys with the Invidia cards. I tried to use the most generic extension calls. Nothing to watch but
A boring little demo. It is the simplest "immediate mode" funtionality. To those wishing to move on to
more advanced topics like custom shaders,  high speed rendering with arrays of positional and color
data, texturing,  lighting,  and all that cool stuff,  you will use a combination of original  calls and some
of the extension pointers created in the file "extensions" in the attachment. Modern OGL is all about
extensions providing the advanced functionality.  In the 64 bit world you MUST know your stuff about
the Win64 (X64) calling convention, especially as regards floating point versus integer arguments. I am
still struggling after years so you are in for a lot of studying if you wish to explore the very cool 3D
world.  Kiptron
looks great :thumbsup:
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke
:)