The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.21 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
naalaa opengl GL_QUADS dosnt work [solved]
#1
Question 
I was trying to play with naalaa opengl and ran into a wall fast. didn't even pass the first nehe tut code.

hers the code. its supposed to show a triangle and a rectangle side by side.

Code:
import "OpenGL.lib"
rem header will be in OpenGL.lib later.
import "gl_h.lib"
import "Keycodes.lib"
import "Speed.lib"


if not glInit("OpenGL Next", 64, 64, 800, 600, true) then end


do
    rem The window is not the NaaLaa window, so we need to let it
    rem deal with its messages and stuff.
    proc glUpdate

    rem clear screen and depth buffer
    _glClear GL_COLOR_BUFFER_BIT OR GL_DEPTH_BUFFER_BIT

    rem reset view
    _glLoadIdentity


    rem set xyz poz
    _glTranslatef -1.5,0.0,-6.0
    rem set color blue
    _glColor3f 0.0,0.0,1.0

    rem draw triangle
    _glBegin GL_TRIANGLES
        _glVertex3f 0.0,1.0,0.0
        _glVertex3f -1.0,-1.0,0.0
        _glVertex3f 1.0,-1.0,0.0
    _glEnd
    rem finish drawing

    _glTranslatef 3.0,0.0,0.0

    rem draw squer
    _glBegin GL_QUADS
        _glVertex3f -1.0,1.0,0.0
        _glVertex3f 1.0,1.0,0.0
        _glVertex3f 1.0,-1.0,0.0
        _glVertex3f -1.0,-1.0,0.0
    _glEnd
    rem finish drawing

    _glRender

_SPD_HoldFrame 60

loop
Reply


Messages In This Thread
naalaa opengl GL_QUADS dosnt work [solved] - by rolen - 01-29-2019, 12:57 PM
RE: naalaa opengl GL_QUADS dosnt work - by Marcus - 01-29-2019, 07:53 PM
RE: naalaa opengl GL_QUADS dosnt work - by rolen - 01-29-2019, 09:43 PM
RE: naalaa opengl GL_QUADS dosnt work - by rolen - 01-29-2019, 10:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)