Shield Effects [OpenGL]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

when i implemented in the game, i had a filthy access violation what i didnt know why i get, and why isnt it in your example.
and for a lot of digging, i found its because u call the delete shieldManager after the device->drop();
actually, because its inherited from IShaderConstantSetCallBack, its reference counted, so shouldn't be deleted.

at constructing:
CShieldManager* shieldManager = new CShieldManager(..);
shieldManager->drop();

then it will delete the class when the device->drop() is called (checked with breakpoint)

hope i helped (and still my previous problem exists D:)
Image
Image
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Hi,

thanks for the tip, I will change it. Also thanks for the hlsl port.
Don't know the cause of the access violation either, sorry. Could be something in my code, though, would not be the first time that something is wrong ;)

greetings
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

no, as i wrote, i solved the accept violation. you dont have to delete the class, the engine does it automatically (coz reference counted)
Image
Image
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

Post by Revan1985 »

why the code located here : http://sudi.pastebin.com/W161RYck
is different from the code you posted in this topic?
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

That code is not mine, Sudi wrote it ;)
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

Post by Revan1985 »

yeah, i see it later...
sorry for the not necessary up of this topic...
so, good job with the shield class, is very beutiful :)
and usefull
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
Noiecity
Posts: 163
Joined: Wed Aug 23, 2023 7:22 pm
Contact:

Re: Shield Effects [OpenGL]

Post by Noiecity »

Amazing
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.

Image
**
Post Reply