Forums

Full Version: OpenGL 3.3 renderer rewrite
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
fudje Wrote:Ubuntu package name is libcurl4-gnutls-dev Smile

thanks Smile , did the job. but now i get:

Code:
    CPP build/ai.o
In file included from src/gl3v/rendertextureentry.h:5,
                 from src/gl3v/rendermodelext.h:6,
                 from include/rendermodelext_drawable.h:4,
                 from include/drawable.h:7,
                 from include/drawable_container.h:4,
                 from include/scenenode.h:4,
                 from include/ai.h:6,
                 from src/ai.cpp:1:
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::SamplerParameteri(GLuint, GLenum, GLint)’:
src/gl3v/glwrapper.h:98: error: ‘glSamplerParameteri’ was not declared in this scope
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::SamplerParameterf(GLuint, GLenum, GLfloat)’:
src/gl3v/glwrapper.h:99: error: ‘glSamplerParameterf’ was not declared in this scope
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::SamplerParameterfv(GLuint, GLenum, const GLfloat*)’:
src/gl3v/glwrapper.h:100: error: ‘glSamplerParameterfv’ was not declared in this scope
In file included from src/gl3v/rendertextureentry.h:5,
                 from src/gl3v/rendermodelext.h:6,
                 from include/rendermodelext_drawable.h:4,
                 from include/drawable.h:7,
                 from include/drawable_container.h:4,
                 from include/scenenode.h:4,
                 from include/ai.h:6,
                 from src/ai.cpp:1:
src/gl3v/glwrapper.h: In member function ‘GLuint GLWrapper::GenSampler()’:
src/gl3v/glwrapper.h:119: error: ‘glGenSamplers’ was not declared in this scope
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::DeleteSampler(GLuint)’:
src/gl3v/glwrapper.h:120: error: ‘glDeleteSamplers’ was not declared in this scope
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::BindSampler(GLuint, GLuint)’:
src/gl3v/glwrapper.h:121: error: ‘glBindSampler’ was not declared in this scope
src/gl3v/glwrapper.h: In member function ‘void GLWrapper::unbindSampler(GLuint)’:
src/gl3v/glwrapper.h:122: error: ‘glBindSampler’ was not declared in this scope
scons: *** [build/ai.o] Error 1

Tongue
You need glew >= 1.5.4 for the GL3.3 pieces.
oops.. 8)

i should have looked at the previous posts to see that someone had that error already.
NaN Wrote:
Quote:Why did you remove the "virtual" tag from drawEnabled?
Assumed there would be no classes derived from RenderModelExternalDrawable. Else might be a good idea to make the destructor virtual too.

But... RenderModelExternalDrawable is a derived class. It derives from RenderModelExternal. If I want to call drawEnabled on a base class (RenderModelExternal) pointer and have the RenderModelExternalDrawable drawEnabled method get called, RenderModelExternalDrawable::drawEnabled must be virtual too, right? It doesn't really matter because due to some other changes RenderModelExternalDrawable::drawEnabled no longer exists, but I'm curious.
Declaring a method virtual tells the compiler to look for it in the vtable. Try:
Code:
#include <iostream>

class Base
{
public:
    virtual void print() {
        std::cout << "base" << std::endl;
    }
};

class Derived : public Base
{
public:
    void print() {
        std::cout << "derived" << std::endl;
    }
};

int main() {
    Base a;
    Derived b;
    Base * c = &b;
    a.print();
    b.print();
    c->print();
    return 0;
}
Oh cool, thanks. It makes sense now. Smile
Guys, is windows build broken or i missed something?

I've downloaded latest glew, rearranged files and now i'm getting:
"obj\Release\src\ai.o:ai.cpp|| undefined reference to `vtable for RenderModelExternalDrawable'|" etc
Project file needed to be updated.
finally got glew 1.5.8 installed. a friend said it might be good to put it in my /usr/local directory. after that it compiled. but won't link:



LINK build/vdrift
build/gl3v/renderpass.o: In function `GLWrapper::GenSampler()':
renderpass.cppSad.text._ZN9GLWrapper10GenSamplerEv[GLWrapper::GenSampler()]+0x20): undefined reference to `__glewGenSamplers'
build/gl3v/renderpass.o: In function `GLWrapper:Big GrineleteSampler(unsigned int)':
renderpass.cppSad.text._ZN9GLWrapper13DeleteSamplerEj[GLWrapper:Big GrineleteSampler(unsigned int)]+0x23): undefined reference to `__glewDeleteSamplers'
build/gl3v/renderpass.o: In function `GLWrapper::unbindSampler(unsigned int)':
renderpass.cppSad.text._ZN9GLWrapper13unbindSamplerEj[GLWrapper::unbindSampler(unsigned int)]+0x23): undefined reference to `__glewBindSampler'
build/gl3v/rendersampler.o: In function `GLWrapper::BindSampler(unsigned int, unsigned int)':
/home/zimluura/Games/vdrift/source/src/gl3v/glwrapper.h:142: undefined reference to `__glewBindSampler'
build/gl3v/renderstate.o: In function `GLWrapper::SamplerParameteri(unsigned int, unsigned int, int)':
renderstate.cppSad.text._ZN9GLWrapper17SamplerParameteriEjji[GLWrapper::SamplerParameteri(unsigned int, unsigned int, int)]+0x2a): undefined reference to `__glewSamplerParameteri'
build/gl3v/renderstate.o: In function `GLWrapper::SamplerParameterf(unsigned int, unsigned int, float)':
renderstate.cppSad.text._ZN9GLWrapper17SamplerParameterfEjjf[GLWrapper::SamplerParameterf(unsigned int, unsigned int, float)]+0x2b): undefined reference to `__glewSamplerParameterf'
build/gl3v/renderstate.o: In function `GLWrapper::SamplerParameterfv(unsigned int, unsigned int, float const*)':
renderstate.cppSad.text._ZN9GLWrapper18SamplerParameterfvEjjPKf[GLWrapper::SamplerParameterfv(unsigned int, unsigned int, float const*)]+0x2b): undefined reference to `__glewSamplerParameterfv'
collect2: ld returned 1 exit status
scons: *** [build/vdrift] Error 1
scons: building terminated because of errors.


i still have the normal ubuntu10.10 glew around(1.5.0 i think). which i can't remove (via synaptic) without taking out gnome too. i know, i know, no real loss, but i don't have a good version of e17 on here yet.

anybody got any ideas?
zimluura Wrote:anybody got any ideas?

Did you clean your vdrift tree before rebuilding?
It might also be necessary to trash SCons's cache - do 'rm .sconsign.dblite' from the vdrift directory.
zimluura Wrote:i still have the normal ubuntu10.10 glew around(1.5.0 i think). which i can't remove (via synaptic) without taking out gnome too. i know, i know, no real loss, but i don't have a good version of e17 on here yet.

anybody got any ideas?

https://launchpad.net/~amuzen/+archive/ppa

Add this ppa, then update via synaptic. You'll have 1.5.6 properly installed.
fudje: on your advice, i tried it. still wouldn't link Sad same error i think.

skankerror: the ppa version got it to link, and now all is well.


thanks to both of you for the helpful suggestions!
just tried the gl3 and get a black screen and segfault after "Loaded GUI successfully".

rv3076 datarv806, nvidia 9600m gs on 260.19.06 that reports gl3.3 capabilities.
Me too.

Code:
INFO: Multithreading enabled: 8 processors
INFO: Starting VDrift: development-full, Version: 3074, O/S: Unix-like
INFO: Home directory: /home/gianni
INFO: Settings file: /home/gianni/.vdrift/VDrift.config
INFO: Data directory: data
      DATA_DIR: /usr/local/share/games/vdrift/data
INFO: Temporary directory: /home/gianni/.vdrift/tmp
INFO: Log file: /home/gianni/.vdrift/log.txt
INFO: SDL initialization successful
INFO: SDL video query was successful
INFO: Disabling antialiasing
INFO: Display change was successful: 1440x900x16 24z fullscreen=0
INFO: GL Renderer: GeForce GTX 260/PCI/SSE2
INFO: GL Vendor: NVIDIA Corporation
INFO: GL Version: 3.3.0 NVIDIA 260.19.06
INFO: Initialized GLEW 1.5.8
INFO: Loading data/shaders/gl3/vdrift1.rhr...
INFO: Loaded data/shaders/gl3/vdrift1.rhr
INFO: GL3 initialization successful
INFO: 0 joysticks found.
INFO: Loading car controls from: /home/gianni/.vdrift/controls.config
INFO: Sound initialization information:
INFO: Obtained audio device:
      Frequency: 44100
      Format: 32784
      Bits per sample: 16
      Channels: 2
      Silence: 0
      Samples: 1024
      Size: 4096
      Sound initialization successful
INFO: Loaded fonts successfully
INFO: Loaded GUI successfully
Segmentation fault

Ubuntu 10.10 for amd64, vdrift rev. 3076.
I have tried to delete ~/.vdrift and restart but nothing. Also I have tried to compile and install latest glew from svn repository.
If it can be usefull, this is my output from gdb:

Code:
...
INFO: Loaded fonts successfully
INFO: Loaded GUI successfully

Program received signal SIGSEGV, Segmentation fault.
0x0000000040067e89 in ?? ()
(gdb) bt
#0  0x0000000040067e89 in ?? ()
#1  0x0000000040000000 in ?? ()
#2  0x00007ffff7ef40f4 in ?? ()
#3  0x0000000000000012 in ?? ()
#4  0x000000000119c5f0 in ?? ()
#5  0x00007ffff25adefb in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.260.19.06
#6  0x00007ffff25aec9e in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.260.19.06
#7  0x00007ffff230f69e in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.260.19.06
#8  0x000000000060ea89 in GLWrapper::DrawElements (this=0xc84240, mode=4, count=18, type=5125, indices=0x119c5f0)
    at src/gl3v/glwrapper.h:151
#9  0x000000000060e899 in RenderModelExternalDrawable::draw (this=0x1277a40, gl=...)
    at src/rendermodelext_drawable.cpp:51
#10 0x0000000000529617 in RenderPass::render (this=0xcb09c0, gl=..., w=1440, h=900, stringMap=..., externalModels=...,
    errorOutput=...) at src/gl3v/renderpass.cpp:286
#11 0x00000000005086f5 in Renderer::render (this=0xc842d8, w=1440, h=900, stringMap=..., externalModels=...,
    errorOutput=...) at src/gl3v/renderer.cpp:90
#12 0x0000000000567b6f in GRAPHICS_GL3V::DrawScene (this=0xc84230, error_output=...) at src/graphics_gl3v.cpp:348
#13 0x00000000004c3f3a in GAME::BeginDraw (this=0x7fffffff4730) at src/game.cpp:641
#14 0x00000000004c421b in GAME::MainLoop (this=0x7fffffff4730) at src/game.cpp:669
#15 0x00000000004bf62c in GAME::Start (this=0x7fffffff4730, args=...) at src/game.cpp:222
#16 0x00000000005d6d53 in main (argc=3, argv=0x7fffffffe308) at src/main.cpp:72
Pages: 1 2 3 4 5